home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / gymake12.zip / TSTRING.H < prev   
Text File  |  1988-11-18  |  817b  |  32 lines

  1. /*
  2.  * tstring.h
  3.  *
  4.  * 88-10-01 v1.0    created by greg yachuk, placed in the public domain
  5.  * 88-10-06 v1.1    changed prerequisite list handling
  6.  * 88-11-11 v1.2    fixed some bugs and added environment variables
  7.  *
  8.  */
  9. #define    tnew(t)        ((t *) talloc(sizeof(t)))
  10. #define    tfree(t)    (free((char *) t))
  11.  
  12. #define    tstrcat(s,p)    (strcat(strcpy(talloc(strlen(s)+strlen(p)+1),(s)),(p)))
  13. #define    tstrcpy(s)    (strcpy(talloc(strlen(s)+1), (s)))
  14.  
  15. #ifdef    MSDOS
  16. char   *talloc(int n);
  17. char   *trealloc(char *s, int n);
  18. char   *tstrncpy(char *s, int n);
  19. int    terror(int n, char *s);
  20. char   *token(char *s, char *sep);
  21. char  **tokenize(char *input);
  22. char   *tgets(FILE *fd);
  23. #else
  24. char   *talloc();
  25. char   *trealloc();
  26. char   *tstrncpy();
  27. int    terror();
  28. char   *token();
  29. char  **tokenize();
  30. char   *tgets();
  31. #endif
  32.